RSA is a widely used public-key cryptosystem. It works by generating a public and private key pair. The public key is used for encryption and digital signatures while the private key is used for decryption and signature verification. Key generation involves finding two prime numbers p and q, computing the modulus n as their product, and using these values to calculate the public and private exponents e and d respectively.